//
// Copyright (C) [2024] Xingyun Integrated Circuit, Inc.
//
// GreenCode was a private technology asset of Xingyun Integrated Circuit， Inc （Confidential）
//  Author: Shawn.Tan
//  Date : 2025.10.28
//
//  History : Initial Version 2025.10.28
//
//
#include "RandomUtils.h"

#include "Log.h"
#include "Random.h"

using namespace std;

namespace Green {

  uint32 random_value32(uint32 min, uint32 max)
  {
    return Random::Instance()->Random32(min, max);
  }

  uint64 random_value64(uint64 min, uint64 max)
  {
    return Random::Instance()->Random64(min, max);
  }

  double random_real(double min, double max)
  {
    return Random::Instance()->RandomReal(min, max);
  }

  void report_error(const char* pErrMsg)
  {
    LOG(fail) << "[report_error] " << pErrMsg << endl;
    FAIL("error-in-random-utils");
  }

}
